package stream.Demo12;

import java.io.File;

/**
 * @Author Miku
 * @Create 2021/5/4 15:47
 * File类的使用
 */
public class Test {
    public static void main(String[] args) throws Exception {
//        separator();
        fileOpe();
    }

    /**
     * 分隔符
     */
    public static void separator() {
        System.out.println("路径分隔符"+ File.pathSeparator);
        System.out.println("名称分隔符"+ File.separator);
    }

    /**
     * 文件操作
     */
    public static void fileOpe() throws Exception {
        File file = new File("e:\\file.txt");
        boolean b = file.createNewFile();
        System.out.println(b);
    }

}
